﻿using System;
using System.Collections.Generic;

namespace 字典
{
	class Program
	{
		static void Main(string[] args)
		{
			Dictionary<int, string> dic = new Dictionary<int, string>();
			dic.Add(1, "张三");
			dic.Add(2, "历史");
			dic.Add(3, "王五");
			dic[1] = "新来的";
			foreach (KeyValuePair<int,string> item in dic)
			{

			}
			//foreach (var item in dic.Keys)
			//{
			//	Console.WriteLine(dic[item]);
			//}
			Console.ReadKey();
		}
	}
}
